Make Visual Studio Build Process A Bit Simpler
authorChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 21 Feb 2014 10:00:29 +0000 (18:00 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 21 Feb 2014 10:00:29 +0000 (18:00 +0800)
Add some flexibility in the property sheets for one building GTK+ that it
also searches for a settable installation path of Python, in addition to
searching the PATH for an installation of the Python interpretor.  This
currently defaults to Python 2.7.x, which is normally installed in
c:\python27 on Windows by default.  Also tell people in the README.txt's
for the Visual Studio builds

build/win32/vs10/README.txt
build/win32/vs10/gtk-gen-srcs.props
build/win32/vs10/gtk-version-paths.props
build/win32/vs9/README.txt
build/win32/vs9/gtk-gen-srcs.vsprops
build/win32/vs9/gtk-version-paths.vsprops

index 27d9ab8b55464cb9ed392190abf06d6e3a3e4897..10caaae8f11dd18b92eb7b8aeb74ea1bba2de40c 100644 (file)
@@ -20,10 +20,14 @@ ATK and GLib.  External dependencies are at least Cairo
 gettext-runtime, fontconfig*, freetype*, expat*.  See the \r
 build/win32/vs10/README.txt file in glib for details where to unpack them.\r
 \r
-You will also need a Python 2.x/3.x interpretor installed on your system,\r
+You will also need a Python 2.6+/3.x interpretor installed on your system,\r
 which can be obtained from the official installers available from\r
 http://www.python.org.  Please note that the Python interpretor (python.exe)\r
-needs to be in your PATH before attempting the build of GTK+.\r
+either needs to be in your PATH before attempting the build of GTK+, or it\r
+can be found in the path specified by PythonPath in gtk-version-paths.props.\r
+If you happen to change the PythonPath setting in gtk-version-paths.props after\r
+opening gtk+.sln with Visual Studio, you will need to close the gtk+.sln solution,\r
+delete all the *.sdf, *.suo and *.user files before re-attempting the build.\r
 \r
 It is recommended that one builds the dependencies with VS10 as far as\r
 possible, especially those from and using the GTK+ stack (i.e. GLib,\r
index 30c3d40c7bea0945183941af687c6f8f9b18f508..7afca8a2a731eee99e100c141f695e220ac4d06a 100644 (file)
@@ -58,6 +58,8 @@ echo $(Configuration) &gt; ..\..\..\MSVC_$(Configuration)
 :DONE_GDKCONFIG_H
     </GenGdkConfigHBroadway>
     <GenerateGtkDbusBuiltSources>
+set PATH=$(PATH);$(PythonPath)
+
 cd ..\..\..\gtk
 
 python $(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml
index 77f3d01c3f7d4e1567107a3b97fcf347be23a3ee..4947225f983a23f50225158ba9b1493218776df2 100644 (file)
@@ -12,6 +12,7 @@
     <GtkSeparateVSDllSuffix>-3-vs$(VSVer)</GtkSeparateVSDllSuffix>
     <GtkDllPrefix>$(GtkSeparateVSDllPrefix)</GtkDllPrefix>
     <GtkDllSuffix>$(GtkSeparateVSDllSuffix)</GtkDllSuffix>
+    <PythonPath>c:\python27</PythonPath>
   </PropertyGroup>
   <PropertyGroup>
     <_PropertySheetDisplayName>gtkversionpathsprops</_PropertySheetDisplayName>
@@ -50,5 +51,8 @@
     <BuildMacro Include="GtkDllSuffix">
       <Value>$(GtkDllSuffix)</Value>
     </BuildMacro>
+    <BuildMacro Include="PythonPath">
+      <Value>$(PythonPath)</Value>
+    </BuildMacro>
   </ItemGroup>
 </Project>
\ No newline at end of file
index 31ecd7617c91bfc0894800f7412d72b741755015..f2f0067a921ee1c34e93d96895ec3623b05d8718 100644 (file)
@@ -19,10 +19,14 @@ ATK and GLib.  External dependencies are at least Cairo
 gettext-runtime, fontconfig*, freetype*, expat*.  See the \r
 build/win32/vs9/README.txt file in glib for details where to unpack them.\r
 \r
-You will also need a Python 2.x/3.x interpretor installed on your system,\r
+You will also need a Python 2.6+/3.x interpretor installed on your system,\r
 which can be obtained from the official installers available from\r
 http://www.python.org.  Please note that the Python interpretor (python.exe)\r
-needs to be in your PATH before attempting the build of GTK+.\r
+either needs to be in your PATH before attempting the build of GTK+, or it\r
+can be found in the path specified by PythonPath in gtk-version-paths.vsprops.\r
+If you happen to change the PythonPath setting in gtk-version-paths.vsprops after\r
+opening gtk+.sln with Visual Studio, you will need to close the gtk+.sln solution,\r
+delete all the *.ncb, *.suo and *.user files before re-attempting the build.\r
 \r
 It is recommended that one builds the dependencies with VS9 as far as\r
 possible, especially those from and using the GTK+ stack (i.e. GLib,\r
index e0361141cdbb7aafdff5e1c79f126d1c77548b67..7b1d0db2344e6bbb3407a67e0694bb8bfcda61ca 100644 (file)
@@ -57,6 +57,8 @@ echo $(ConfigurationName) &gt; ..\..\..\MSVC_$(ConfigurationName)&#x0D;&#x0A;
        <UserMacro
                Name="GenerateGtkDbusBuiltSources"
                Value="
+set PATH=$(PATH);$(PythonPath)&#x0D;&#x0A;
+
 cd ..\..\..\gtk&#x0D;&#x0A;
 python $(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml&#x0D;&#x0A;
 cd $(SolutionDir)&#x0D;&#x0A;
index b4c7f883549481cbcffc3788ef38dad1c93c90e2..9af818704da8ad3d6dbefb049db2f6f310f3a417 100644 (file)
@@ -50,4 +50,8 @@
                Name="GtkDllSuffix"
                Value="$(GtkSeparateVSDllSuffix)"
        />
+       <UserMacro
+               Name="PythonPath"
+               Value="c:\python27"
+       />
 </VisualStudioPropertySheet>
\ No newline at end of file